<?php
    class LRedis{
        private $host="120.79.218.85";
        private $prot="6379";
        public $rediss;
//    $redis = new Redis();
//    $redis->connect('120.79.218.85', 6379);

        public function __construct(){
            $this->rediss = $this->getInstance();
            //code
        }
        private function __clone(){
            //code
        }
        /**
         * 获取实例化的PDO，单例模式
         * @return PDO
         */
        private function getInstance(){
            $redis = new Redis();
            return $redis->connect($this->host, $this->prot);
        }
    }